const state = {
    goods:[{
      id:'',
        url:'',
        price:'',
        uploadDate:'',
        name:'',
        author:'',
        tags:[],
        historyAuthor:[],
        historyPrice:[],
        detail:'',
    }]
};

const getters = {
    getGoods: state => state.goods,
};

const mutations = {
    setGoods(state,goods){
        state.goods = goods
    },
    deleteGoods(state){
        state.goods.length = 0
    },
    getGoodById(state,id){
        return state.goods[id];
    }
};
const actions = {

};

export default {
    state,
    getters,
    actions,
    mutations
};

